
function showfilediv() {
		if(document.getElementById("imgurl").value !="" ){
		  document.getElementById("imgdiv").style.display = "block";
		}
}

$(function(){
	    $("#userinfo td").not($("#filter_ke td")).addClass("info_td1");
		$("#userinfo tr").find("td:even").not($("#filter_ke td")).addClass("title_info2");
		$("#userinfo tr").find("td:odd").not($("#filter_ke td")).css("padding-left","5px");
});


function  goback(){
		            window.location.href="announcement_toAnnouncementManage.shtml";
}       


	function bigCategoryChange(){
	var bigCategoryValue = $("#bigCategory option:selected").val();
	if(bigCategoryValue != ""){
		$('#smallCategory').html('加载中... ...');
		$.get('../category/category_loadCategoryByPid.shtml?id='+bigCategoryValue+'&t='+new Date().getTime().toString(36),function(mes){
			var json = eval('('+mes+')');
			var str = '<select name="tgAnnouncement.categoryId" id="categoryId"  ><option value="">请选择</option>';
			for(var i = 0; i < json.length; i++){
				str += '<option value="'+json[i]['id']+'">'+json[i]['name']+'</option>';
			}
			str+='</select>';
			$('#smallCategory').html(str);
		})
	}
}

  function checkform(){
   var type = document.getElementById("typediv").style.display;
    if(type.value=="block")
    {  
      var categoryId =  document.getElementById("bigCategory");
      if(categoryId.value==-1) 
       alert("请选择类别");
       return false;
    }
    return true;
}


function showdiv(obj){
   if(obj.value==2||obj.value==3){
       document.getElementById("typediv").style.display = "none";
   }else{
    document.getElementById("typediv").style.display = "block";
   }
}  

function showdiv1(){
   if(obj.value==2||obj.value==3){
       document.getElementById("typediv").style.display = "none";
   }else{
    document.getElementById("typediv").style.display = "block";
   }
}  

